package me.zhengjie.modules.lock.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.zelk.smartlock.common.constant.Constant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@ApiModel("运营端门锁的蓝牙钥匙列表响应结果")
@Data
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public class LockBleKeyInfoListDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "蓝牙钥匙Id")
    @JsonSerialize(using = ToStringSerializer.class)
    protected Long bleKeyId;

    @ApiModelProperty(value = "门锁管理员-partnerId")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long partnerId;

    @ApiModelProperty(value = "门锁管理员名称", dataType = "String")
    private String partnerName;

    @ApiModelProperty(value = "门锁和商户绑定表的ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long lockOwnerId;

    @ApiModelProperty(value = "蓝牙钥匙")
    private String bleKey;

    @ApiModelProperty(value = "时段钥匙：period,周开锁：week, 月开锁：month，一次性：once")
    private String keyType;
    @ApiModelProperty(value = "时段钥匙：period,周开锁：week, 月开锁：month，一次性：once")
    private String keyTypeDesc;

    @ApiModelProperty(value = "指令跟踪码")
    private Integer trackId;

    @ApiModelProperty(value = "钥匙别名")
    private String alias;

    @ApiModelProperty(value = "密码有效开始时间")
    @JsonFormat(pattern = Constant.DATA_FORMAT, timezone = Constant.TIME_ZONE)
    private LocalDateTime startTime;

    @ApiModelProperty(value = "密码有效结束时间")
    @JsonFormat(pattern = Constant.DATA_FORMAT, timezone = Constant.TIME_ZONE)
    private LocalDateTime endTime;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = Constant.DATA_FORMAT, timezone = Constant.TIME_ZONE)
    protected LocalDateTime createDate;

    @ApiModelProperty(value = "备注")
    protected String remark;

}
